<?php

require_once "core/application/models/musers/musers4.php";

class Musers5 extends Musers4 {

    private $_query;

    protected function getSelfPlayerId($nick) {
        /**
         * @param string $nick
         * @return ID собственного чара
         */
        DB::getInstance()->openConnectionToGS();
        $this->_query = "SELECT `id` FROM `players` WHERE `name` = '$nick' AND `account_name` = '$_SESSION[name]'";
        $fetch = mysql_fetch_assoc(DB::getInstance()->sql($this->_query));
        return $fetch['id'];
        DB::getInstance()->closeConnection();
        unset($this->_query);
    }

}

?>
